package com.lxx.modules.sys.biz.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.lxx.common.BaseServiceImpl;
import com.lxx.modules.sys.biz.ISysPermissionBiz;
import com.lxx.modules.sys.dao.SysPermissionDao;
import com.lxx.modules.sys.entity.SysPermission;
import com.lxx.vo.ZTreeVo;

@Service
public class SysPermissionBizImpl extends BaseServiceImpl<SysPermission, Integer, SysPermissionDao> implements ISysPermissionBiz{

	@Override
	public Integer convertId(String idStr) {
		return Integer.parseInt(idStr);
	}

	@Override
	public int delete(SysPermission t) {
		t.setDelFlag(true);
		return baseMapper.updateByPrimaryKeySelective(t);
	}

	@Override
	public List<SysPermission> queryAll() {
		return baseMapper.queryAll();
	}

	@Override
	public List<ZTreeVo> queryTree4Add() {
		return baseMapper.queryTree4Add();
	}

	@Override
	public List<ZTreeVo> getRolePermissions(Integer roleId) {
		return baseMapper.getRolePermissions(roleId);
	}

	@Override
	public List<Map<String, Object>> queryAll1() {
		return baseMapper.queryAll1();
	}
}
